<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport" />
<title>作品展示-网络中国节</title>
<meta content="" name="keywords" />
<meta content="" name="description" />
<meta content="" name="author" />
<meta content="Copyright &copy;  版权所有" name="copyright" />
<link href="__CSS__style1.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="__JS__jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="__JS__jquery.qrcode.min.js"></script>
<style type="text/css">
	.qrcodebg{position: absolute; z-index: 98; width: 100%; height: 100%; padding: 8px; background-color: rgba(0,0,0,.6); top: 0px; left: 0px; overflow:hidden; display: none;}
	.qrcode{position: absolute; z-index: 99; width: 180px; height: 180px; padding: 10px; background-color: #fff; top: 30px; left: 50%; margin-left: -105px;}
	.qrcodebg span.close{display: block; width: 40px; height: 40px; line-height: 40px; font-style: normal; background-color: #f00; color: #fff; font-size: 26px; font-style: bold; text-align: center; position: absolute; z-index: 100; cursor: pointer; top: 5px; right: 20px; border-radius: 100%;}
</style>
</head>

<body >
<!-- <div class="code">
	<img src="__IMG__ewm.png">
	<em>快快扫描二维码报名吧！</em>
</div> -->
<div class="w">
	<div class="wangluo-top-nav">
		<div class="center-cup clearfix">
			<a href="#" class="logo-box">
				<img src="/fstsets/fstv/img/logo.png">
			</a>
			<div class="wangluo-nav">
				<ul class="clearfix">
					<li><a href="{:U('Index/index')}">网站首页</a></li>
					<li><a href="{:U('Index/pingxuan')}">评选办法</a></li>
					<li><a href="{:U('Index/votelist')}" class="current">作品展示</a></li>
					<li><a href="{:U('Index/hezuo')}">合作联系</a></li>
					<li><a href="{:U('Index/xiazai')}">投稿下载</a></li>
				</ul>
			</div>
		</div>
	</div>
	<div class="w-banner">
		<!--<if condition="$fstvpic['fstvpicture'] neq '' ">
		   <img src="{$fstvpic.fstvpicture}" width="1920px" height="376px">
		 <else/>
		   <img src="__IMG__pic04.png" width="1920px" height="376px">
		</if>-->
		 <img src="__IMG__网络文化节banner.jpg">
	</div>
	
	<div class="center-cup" style="margin-top:20px;">
		<div class="content-nav">
			<ul class="clearfix ulcontent">
				<foreach name="fstvname" item="vo">
					<li <if condition="$vo['fstvid'] eq $curfstvname['fstvid']">class="current"</if>><a  href="__URL__/votelist/fstvid/{$vo.fstvid}/netid/{$curnetobj['netid']}">{$vo.fstvnm}</a></li>
				</foreach>
			</ul>
			<i><img src="__IMG__tag02.png"></i>
		</div>
		
		<div class="qiehuan-content-box">
				<div class="content-qiehuan">
				  
					<div class="tab-nav">
						<ul>
						  <li><a href="{:U('votelist',array('fstvid'=>$fstvid))}">全部</a></li>
						  <foreach name="netobj" item="vo">
							  <li <if condition="$vo['netid'] eq $curnetobj['netid']">class="current"</if>><a href="{:U('votelist',array('fstvid'=>$fstvid,'netid'=>$vo['netid']))}">{$vo.netname}</a></li>
						  </foreach>
						</ul>
					</div>
					<?php 
				     	function subtext($text, $length)
					    {
					        if(mb_strlen($text, 'utf8') > $length) 
					        return mb_substr($text, 0, $length, 'utf8').'......';
					        return $text;
					    }
 					?>
					<div class="xuanshou-table-content">
						<div class="xuanshou-box clearfix" style="border:none">
						  <volist name="votelist" id="vo" key="k" empty='暂无数据'>
							<div class="xuanshou-list" style="cursor:pointer; overflow:hidden;">
							 <if condition="$vo.urladdr neq '' ">
							 	<a href="{$vo.urladdr}">
									<div class="video-box">
							            <div class="tupian-box">
							            	<img src="{$vo.picture}" width="370px" height="245px">
							            </div>
							            <div class="zhezhao">
							            	<div class="xinxi clearfix">
							            		<p style="float:left">{$vo.title}</p>
							            		<p style="float:right;text-align:right">{$vo.authornm}</p>
							            	</div>
							            	<div class="xiangxi">
							            		{$vo.content|subtext=37}
							            	</div>
							            </div>
							            <em><img src="__IMG__play.png"></em>       
							        </div>
						        </a>
						      <else/>
							    <div class="video-box" onclick="location.href='{:U('zuopindetails',array('atcid'=>$vo['id']))}'" >
							    	<div class="tupian-box">
						            	<img src="{$vo.picture}" width="370px" height="245px">
						            </div>
						            <div class="zhezhao">
						            	<div class="xinxi clearfix">
						            		<p style="float:left">{$vo.title}</p>
						            		<p style="float:right;text-align:right">{$vo.authornm}</p>
						            	</div>
						            	<div class="xiangxi">
						            		{$vo.content|subtext=37}
						            	</div>
						            </div>
						            <em><img src="__IMG__play.png"></em>       
						        </div>	
							 </if>
						        <div class="qrcodebg"><span class="close">X</span><div class='qrcode'></div></div>
						        <div class="toupiao-btn-box clearfix">
						        	<p class="clearfix"><img src="__IMG__star.png"><i class="ticket"><b class="num">{$vo.votes}</b>票</i></p>
						        	<p class="clearfix"><img src="__IMG__paihang.png"><i>{$k+1}名</i></p>

						        	<!--<if condition="$vo.urladdr neq '' ">
										<a class="btnclick" actid="{$vo.id}" num="{$vo.votes}" url="{:U('Index/leibie')}}">给TA投票</a>
									  <else/>
										<a class="btnclick" actid="{$vo.id}" num="{$vo.votes}" url="{:C('WEBDOMAIN')}{:U('zuopindetails',array('atcid'=>$vo['id']))}">给TA投票</a>
									</if>--> 


						        	<input type="hidden" value="{$vo.id}" class="actid"/>
						        	<a class="btnclick" actid="{$vo.id}" num="{$vo.votes}" url="http://www.wlzgj.cn{:U('Index/leibie')}">给TA投票</a>
						        </div>
						       <!--  <i class="chenggong"></i> -->
							</div>
						  </volist>	
						</div>
					</div>
				</div>
		</div>
	</div>
</div>
<include file="footerask"/>
<script type="text/javascript" >
  	$(document).ready(function($) {

  		$(window).on('scroll', function () {
  			var scrollBottom = $(window).scrollTop() + $(window).height();
                if ($(window).scrollTop() > 500) {
                    $('.code').animate({
                    	top: '30%'},800)
                } 
                if ($(document).scrollTop() = 0) {
                    //alert("滚动条已经到达顶部为0")
                    $(".code").fadeOut();
                }else if ($(document).scrollTop() = $(document).height() - $(window).height()) {
                    $(".code").fadeIn();
                };
            });
  		
  		$(".toupiao-btn-box a").each(function(index, el) {
  			$(this).click(function(event) {
  				$(this).parents(".xuanshou-list").find(".chenggong").fadeIn()
  			});
  			var timesRun = 0;
	        var interval = setInterval(function(){
	        timesRun += 1;
	        if(timesRun === 60){
	        clearInterval(interval);
	        }
	        $(".chenggong").fadeOut()
	        }, 2000);
	  	});

	  	$(".wangluo-nav ul li").click(function(event) {
	  		$(this).addClass('current').siblings('.wangluo-nav ul li').removeClass('current')
	  	});

	  	$(".xuanshou-list").each(function(index, el) {
	  		$(this).hover(function() {
	  			$(this).find(".xiangxi").show();
	  		}, function() {
	  			$(this).find(".xiangxi").hide();
	  		});
	  	});


  	});
	
	
	/*$(".toupiao-btn-box").each(function(index,element){ 
		var t = $(this);
		t.find(".btnclick").click(function(){
			var articid =  $(this).attr("actid");
			var numval  =  $(this).attr("num");
			// $(this).prev().prev().prev().children(".ticket").text('10票');
			 $.ajax({ 
			    type: 'POST', 
			    url: '__URL__/addVote', 
			    dataType:'JSON',
			    data: {articid:articid,num:numval,rand:Math.random()}, 
			    success: function (data) { 
			//	 alert(JSON.stringify(data.votes));
				 if(data==1){ 
				 	$(".chenggong").html("不能投票超过3次,明天再来吧");
				 }else{ 
				 	$(".chenggong").html("您已经投票成功");
				 }
				 t.find("b.num").html(data.votes);
			    } 
			 });
		});
	})*/

	$(".xuanshou-list").each(function(index,element){ 
		var t = $(this);
		t.find(".btnclick").click(function(){
			var data =  $(this).attr('url');
			var actid = $(this).attr('actid');
			 $.ajax({ 
			    type: 'POST', 
			    url: '__URL__/sccode', 
			    dataType:'JSON',
//			    data: {data:data,actid:actid,rand:Math.random()}, 
				data: {data:data,actid:'wlzgj',rand:Math.random()}, 
			    success: function (data) { 
					qrcode(t,data.data);
			    } 
			 });
		});
	})
	

	// $(".xuanshou-list").each(function(index,element){ 
	// 	var t = $(this);
	// 	t.find(".btnclick").click(function(){
	// 		var data = $(this).attr('url');
	// 		qrcode(t,data);
	// 	});
	// })

	function qrcode(obj,data){ 
		var t = obj.find(".qrcodebg");
		t.show();
		obj.find(".qrcode").html("<img src='/"+data+"' width='180' height='180'>");
	}

	// function qrcode(obj,data){ 
	// 	var t = obj.find(".qrcodebg");
	// 	var t1 = obj.find(".qrcode");
	// 	if(t1.html()==''){ 
	// 		t1.qrcode({ 
	// 		    render: "table", //table方式 
	// 		    width: 180, //宽度 
	// 		    height:180, //高度 
	// 		    text: data //任意内容 
	// 		});
	// 	}
	// 	t.show();
	// }

	$("span.close").each(function(index,element){ 
		var t = $(this);
		t.click(function(){ 
			$(".qrcodebg:eq("+index+")").hide();
		})
	})


  </script>

</body>
</html>
